.class public Lcom/brixd/niceapp/control/RhythmLayout;
.super Landroid/widget/HorizontalScrollView;
.source "RhythmLayout.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;
    }
.end annotation


# static fields
.field public static final ITEMS_DISPLAY_NUM:I = 0x7

.field public static final ITEM_BOUNCE_DURATION:I = 0x15e

.field public static final ITEM_SWIPE_BOUNCE_DURATION:I = 0xb4

.field public static final ITEM_TOP_MIN_TRANSLATION_Y:I = 0xa

.field public static final RHYTHM_SCROLLER_SCROLL_DURATION:I = 0x12c

.field public static mEdgeSizeForShiftRhythm:I

.field public static mItemInitTranslationHeight:I


# instance fields
.field private currentMoveItemPosition:I

.field private lastDisplayItemPosition:I

.field private mHandler:Landroid/os/Handler;

.field private mLinearLayout:Landroid/widget/LinearLayout;

.field private mRhythmAdapter:Lcom/brixd/niceapp/control/RhythmAdapter;

.field private mTimer:Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;

.field private rhythmIntervalHeight:I

.field private rhythmItemListener:Lcom/brixd/niceapp/control/IRhythmItemListener;

.field private rhythmItemWidth:F

.field private screenWidth:I

.field private scrollRhythmStartDelayTime:I


# direct methods
.method static constructor <clinit>()V
    .registers 1

    .prologue
    .line 33
    const/16 v0, 0x30

    sput v0, Lcom/brixd/niceapp/control/RhythmLayout;->mEdgeSizeForShiftRhythm:I

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .registers 4
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    const/4 v1, -0x1

    .line 47
    invoke-direct {p0, p1}, Landroid/widget/HorizontalScrollView;-><init>(Landroid/content/Context;)V

    .line 40
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mHandler:Landroid/os/Handler;

    .line 42
    iput v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->lastDisplayItemPosition:I

    .line 43
    iput v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->currentMoveItemPosition:I

    .line 44
    const/4 v0, 0x0

    iput v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->scrollRhythmStartDelayTime:I

    .line 48
    invoke-direct {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->init()V

    .line 49
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 5
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;

    .prologue
    const/4 v1, -0x1

    .line 52
    invoke-direct {p0, p1, p2}, Landroid/widget/HorizontalScrollView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 40
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mHandler:Landroid/os/Handler;

    .line 42
    iput v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->lastDisplayItemPosition:I

    .line 43
    iput v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->currentMoveItemPosition:I

    .line 44
    const/4 v0, 0x0

    iput v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->scrollRhythmStartDelayTime:I

    .line 53
    invoke-direct {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->init()V

    .line 54
    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/control/RhythmLayout;)Ljava/util/List;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/control/RhythmLayout;

    .prologue
    .line 25
    invoke-direct {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->getAllRhythmViews()Ljava/util/List;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$100(Lcom/brixd/niceapp/control/RhythmLayout;)I
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/control/RhythmLayout;

    .prologue
    .line 25
    iget v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->screenWidth:I

    return v0
.end method

.method static synthetic access$300(Lcom/brixd/niceapp/control/RhythmLayout;)Landroid/widget/LinearLayout;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/control/RhythmLayout;

    .prologue
    .line 25
    iget-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    return-object v0
.end method

.method static synthetic access$400(Lcom/brixd/niceapp/control/RhythmLayout;ZZ)Ljava/util/List;
    .registers 4
    .param p0, "x0"    # Lcom/brixd/niceapp/control/RhythmLayout;
    .param p1, "x1"    # Z
    .param p2, "x2"    # Z

    .prologue
    .line 25
    invoke-direct {p0, p1, p2}, Lcom/brixd/niceapp/control/RhythmLayout;->getVisibleRhythmViews(ZZ)Ljava/util/List;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$500(Lcom/brixd/niceapp/control/RhythmLayout;ILjava/util/List;)V
    .registers 3
    .param p0, "x0"    # Lcom/brixd/niceapp/control/RhythmLayout;
    .param p1, "x1"    # I
    .param p2, "x2"    # Ljava/util/List;

    .prologue
    .line 25
    invoke-direct {p0, p1, p2}, Lcom/brixd/niceapp/control/RhythmLayout;->makeRhythmItems(ILjava/util/List;)V

    return-void
.end method

.method static synthetic access$600(Lcom/brixd/niceapp/control/RhythmLayout;J)V
    .registers 4
    .param p0, "x0"    # Lcom/brixd/niceapp/control/RhythmLayout;
    .param p1, "x1"    # J

    .prologue
    .line 25
    invoke-direct {p0, p1, p2}, Lcom/brixd/niceapp/control/RhythmLayout;->vibrate(J)V

    return-void
.end method

.method static synthetic access$700(Lcom/brixd/niceapp/control/RhythmLayout;)Landroid/os/Handler;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/control/RhythmLayout;

    .prologue
    .line 25
    iget-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mHandler:Landroid/os/Handler;

    return-object v0
.end method

.method private getAllRhythmViews()Ljava/util/List;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Landroid/view/View;",
            ">;"
        }
    .end annotation

    .prologue
    .line 284
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 285
    .local v0, "allViews":Ljava/util/List;, "Ljava/util/List<Landroid/view/View;>;"
    iget-object v3, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v3}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v1

    .line 286
    .local v1, "count":I
    const/4 v2, 0x0

    .local v2, "i":I
    :goto_c
    if-ge v2, v1, :cond_1a

    .line 287
    iget-object v3, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v2}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v3

    invoke-interface {v0, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 286
    add-int/lit8 v2, v2, 0x1

    goto :goto_c

    .line 290
    :cond_1a
    return-object v0
.end method

.method private getScreenDisplayMetrics()Landroid/util/DisplayMetrics;
    .registers 3

    .prologue
    .line 101
    new-instance v0, Landroid/util/DisplayMetrics;

    invoke-direct {v0}, Landroid/util/DisplayMetrics;-><init>()V

    .line 102
    .local v0, "dm":Landroid/util/DisplayMetrics;
    invoke-virtual {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->getContext()Landroid/content/Context;

    move-result-object v1

    check-cast v1, Landroid/app/Activity;

    invoke-virtual {v1}, Landroid/app/Activity;->getWindowManager()Landroid/view/WindowManager;

    move-result-object v1

    invoke-interface {v1}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V

    .line 103
    return-object v0
.end method

.method private getVisibleRhythmViews()Ljava/util/List;
    .registers 7
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Landroid/view/View;",
            ">;"
        }
    .end annotation

    .prologue
    .line 245
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    .line 246
    .local v3, "views":Ljava/util/List;, "Ljava/util/List<Landroid/view/View;>;"
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    if-nez v4, :cond_a

    .line 254
    :cond_9
    return-object v3

    .line 249
    :cond_a
    invoke-virtual {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->getFirstVisibleItemPosition()I

    move-result v0

    .line 250
    .local v0, "firstVisibleItemPosition":I
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v4

    const/4 v5, 0x7

    if-ge v4, v5, :cond_2c

    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v2

    .line 251
    .local v2, "toIndex":I
    :goto_1d
    move v1, v0

    .local v1, "i":I
    :goto_1e
    if-ge v1, v2, :cond_9

    .line 252
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v4

    invoke-interface {v3, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 251
    add-int/lit8 v1, v1, 0x1

    goto :goto_1e

    .line 250
    .end local v1    # "i":I
    .end local v2    # "toIndex":I
    :cond_2c
    add-int/lit8 v2, v0, 0x7

    goto :goto_1d
.end method

.method private getVisibleRhythmViews(ZZ)Ljava/util/List;
    .registers 9
    .param p1, "includeLeftHiddenOne"    # Z
    .param p2, "includeRightHiddenOne"    # Z
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(ZZ)",
            "Ljava/util/List",
            "<",
            "Landroid/view/View;",
            ">;"
        }
    .end annotation

    .prologue
    .line 258
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    .line 260
    .local v3, "views":Ljava/util/List;, "Ljava/util/List<Landroid/view/View;>;"
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    if-nez v4, :cond_a

    .line 280
    :cond_9
    return-object v3

    .line 263
    :cond_a
    invoke-virtual {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->getFirstVisibleItemPosition()I

    move-result v0

    .line 264
    .local v0, "firstVisibleItemPosition":I
    if-eqz p1, :cond_14

    .line 265
    if-lez v0, :cond_14

    .line 266
    add-int/lit8 v0, v0, -0x1

    .line 270
    :cond_14
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v4

    const/4 v5, 0x7

    if-ge v4, v5, :cond_3e

    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v2

    .line 271
    .local v2, "toIndex":I
    :goto_23
    if-eqz p2, :cond_2f

    .line 272
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v4

    if-ge v2, v4, :cond_2f

    .line 273
    add-int/lit8 v2, v2, 0x1

    .line 277
    :cond_2f
    move v1, v0

    .local v1, "i":I
    :goto_30
    if-ge v1, v2, :cond_9

    .line 278
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v4

    invoke-interface {v3, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 277
    add-int/lit8 v1, v1, 0x1

    goto :goto_30

    .line 270
    .end local v1    # "i":I
    .end local v2    # "toIndex":I
    :cond_3e
    add-int/lit8 v2, v0, 0x7

    goto :goto_23
.end method

.method private init()V
    .registers 4

    .prologue
    .line 83
    invoke-direct {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->getScreenDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    .line 84
    .local v0, "dm":Landroid/util/DisplayMetrics;
    iget v1, v0, Landroid/util/DisplayMetrics;->widthPixels:I

    iput v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->screenWidth:I

    .line 86
    iget v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->screenWidth:I

    int-to-float v1, v1

    const/high16 v2, 0x40e00000

    div-float/2addr v1, v2

    iput v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemWidth:F

    .line 87
    invoke-virtual {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f09007d

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    sput v1, Lcom/brixd/niceapp/control/RhythmLayout;->mEdgeSizeForShiftRhythm:I

    .line 89
    iget v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemWidth:F

    float-to-int v1, v1

    sput v1, Lcom/brixd/niceapp/control/RhythmLayout;->mItemInitTranslationHeight:I

    .line 90
    sget v1, Lcom/brixd/niceapp/control/RhythmLayout;->mItemInitTranslationHeight:I

    div-int/lit8 v1, v1, 0x6

    iput v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmIntervalHeight:I

    .line 92
    new-instance v1, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;-><init>(Lcom/brixd/niceapp/control/RhythmLayout;)V

    iput-object v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mTimer:Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;

    .line 93
    iget-object v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mTimer:Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;

    invoke-virtual {v1}, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->startMonitor()V

    .line 94
    return-void
.end method

.method private makeRhythmItems(ILjava/util/List;)V
    .registers 9
    .param p1, "currentItemIndex"    # I
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(I",
            "Ljava/util/List",
            "<",
            "Landroid/view/View;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 228
    .local p2, "views":Ljava/util/List;, "Ljava/util/List<Landroid/view/View;>;"
    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v4

    if-lt p1, v4, :cond_7

    .line 242
    :cond_6
    :goto_6
    return-void

    .line 231
    :cond_7
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_8
    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v4

    if-ge v1, v4, :cond_29

    .line 232
    invoke-interface {p2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/view/View;

    .line 233
    .local v3, "view":Landroid/view/View;
    sub-int v4, p1, v1

    invoke-static {v4}, Ljava/lang/Math;->abs(I)I

    move-result v0

    .line 234
    .local v0, "absInterval":I
    iget v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmIntervalHeight:I

    mul-int/2addr v4, v0

    const/16 v5, 0xa

    invoke-static {v4, v5}, Ljava/lang/Math;->max(II)I

    move-result v2

    .line 236
    .local v2, "translationY":I
    invoke-virtual {p0, v3, v2}, Lcom/brixd/niceapp/control/RhythmLayout;->updateRhythmItemHeight(Landroid/view/View;I)V

    .line 231
    add-int/lit8 v1, v1, 0x1

    goto :goto_8

    .line 239
    .end local v0    # "absInterval":I
    .end local v2    # "translationY":I
    .end local v3    # "view":Landroid/view/View;
    :cond_29
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemListener:Lcom/brixd/niceapp/control/IRhythmItemListener;

    if-eqz v4, :cond_6

    .line 240
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemListener:Lcom/brixd/niceapp/control/IRhythmItemListener;

    invoke-interface {v4, p1}, Lcom/brixd/niceapp/control/IRhythmItemListener;->onRhythmItemChanged(I)V

    goto :goto_6
.end method

.method private smoothScrollX(IIIZ)Landroid/animation/Animator;
    .registers 6
    .param p1, "x"    # I
    .param p2, "duration"    # I
    .param p3, "startDelay"    # I
    .param p4, "shouldStart"    # Z

    .prologue
    .line 351
    invoke-static {p0, p1, p2, p3, p4}, Lcom/brixd/niceapp/animator/AnimatorUtils;->moveScrollViewToX(Landroid/view/View;IIIZ)Landroid/animation/Animator;

    move-result-object v0

    return-object v0
.end method

.method private updateRhythmItemHeight(F)V
    .registers 7
    .param p1, "x"    # F

    .prologue
    .line 205
    invoke-direct {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->getVisibleRhythmViews()Ljava/util/List;

    move-result-object v2

    .line 206
    .local v2, "views":Ljava/util/List;, "Ljava/util/List<Landroid/view/View;>;"
    iget v3, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemWidth:F

    div-float v1, p1, v3

    .line 207
    .local v1, "currentItemIndexF":F
    float-to-int v0, v1

    .line 209
    .local v0, "currentItemIndex":I
    iget v3, p0, Lcom/brixd/niceapp/control/RhythmLayout;->currentMoveItemPosition:I

    if-ne v0, v3, :cond_e

    .line 225
    :cond_d
    :goto_d
    return-void

    .line 213
    :cond_e
    iget-object v3, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    if-eqz v3, :cond_d

    .line 217
    iget-object v3, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v3}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v3

    if-ge v0, v3, :cond_d

    .line 221
    iput v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->currentMoveItemPosition:I

    .line 222
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "current moving item position is "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->currentMoveItemPosition:I

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Lcom/zuiapps/suite/utils/log/LogUtil;->d(Ljava/lang/String;)V

    .line 224
    invoke-direct {p0, v0, v2}, Lcom/brixd/niceapp/control/RhythmLayout;->makeRhythmItems(ILjava/util/List;)V

    goto :goto_d
.end method

.method private vibrate(J)V
    .registers 10
    .param p1, "duration"    # J

    .prologue
    .line 394
    invoke-virtual {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->getContext()Landroid/content/Context;

    move-result-object v2

    const-string v3, "vibrator"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/os/Vibrator;

    .line 395
    .local v1, "vibrator":Landroid/os/Vibrator;
    const/4 v2, 0x2

    new-array v0, v2, [J

    const/4 v2, 0x0

    const-wide/16 v4, 0x0

    aput-wide v4, v0, v2

    const/4 v2, 0x1

    aput-wide p1, v0, v2

    .line 396
    .local v0, "pattern":[J
    const/4 v2, -0x1

    invoke-virtual {v1, v0, v2}, Landroid/os/Vibrator;->vibrate([JI)V

    .line 397
    return-void
.end method


# virtual methods
.method public bounceUpRhythmItem(IZ)Landroid/animation/Animator;
    .registers 5
    .param p1, "position"    # I
    .param p2, "shouldStart"    # Z

    .prologue
    .line 355
    if-ltz p1, :cond_d

    .line 356
    iget-object v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v1, p1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    .line 357
    .local v0, "view":Landroid/view/View;
    invoke-virtual {p0, v0, p2}, Lcom/brixd/niceapp/control/RhythmLayout;->bounceUpRhythmItem(Landroid/view/View;Z)Landroid/animation/Animator;

    move-result-object v1

    .line 359
    .end local v0    # "view":Landroid/view/View;
    :goto_c
    return-object v1

    :cond_d
    const/4 v1, 0x0

    goto :goto_c
.end method

.method public bounceUpRhythmItem(Landroid/view/View;Z)Landroid/animation/Animator;
    .registers 6
    .param p1, "view"    # Landroid/view/View;
    .param p2, "shouldStart"    # Z

    .prologue
    .line 364
    if-eqz p1, :cond_c

    .line 365
    const/16 v0, 0xa

    const/16 v1, 0x15e

    const/4 v2, 0x1

    invoke-static {p1, v0, v1, p2, v2}, Lcom/brixd/niceapp/animator/AnimatorUtils;->showUpAndDownBounce(Landroid/view/View;IIZZ)Landroid/animation/Animator;

    move-result-object v0

    .line 367
    :goto_b
    return-object v0

    :cond_c
    const/4 v0, 0x0

    goto :goto_b
.end method

.method public dispatchTouchEvent(Landroid/view/MotionEvent;)Z
    .registers 11
    .param p1, "event"    # Landroid/view/MotionEvent;

    .prologue
    const/high16 v6, -0x40800000

    const/4 v8, 0x1

    .line 148
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v4

    const/4 v5, 0x2

    if-ne v4, v5, :cond_45

    .line 149
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mTimer:Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v5

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v6

    invoke-virtual {v4, v5, v6}, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->monitorTouchPosition(FF)V

    .line 151
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v3

    .line 152
    .local v3, "x":F
    const-string v4, "dispatchTouchEvent"

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "move the x is "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, " y is "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Lcom/zuiapps/suite/utils/log/LogUtil;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 153
    invoke-direct {p0, v3}, Lcom/brixd/niceapp/control/RhythmLayout;->updateRhythmItemHeight(F)V

    .line 201
    .end local v3    # "x":F
    :cond_44
    :goto_44
    return v8

    .line 154
    :cond_45
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v4

    if-nez v4, :cond_81

    .line 155
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mTimer:Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v5

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v6

    invoke-virtual {v4, v5, v6}, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->monitorTouchPosition(FF)V

    .line 157
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v3

    .line 158
    .restart local v3    # "x":F
    const-string v4, "dispatchTouchEvent"

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "down the x is "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Lcom/zuiapps/suite/utils/log/LogUtil;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 159
    invoke-direct {p0, v3}, Lcom/brixd/niceapp/control/RhythmLayout;->updateRhythmItemHeight(F)V

    .line 161
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemListener:Lcom/brixd/niceapp/control/IRhythmItemListener;

    if-eqz v4, :cond_44

    .line 162
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemListener:Lcom/brixd/niceapp/control/IRhythmItemListener;

    invoke-interface {v4}, Lcom/brixd/niceapp/control/IRhythmItemListener;->onStartSwipe()V

    goto :goto_44

    .line 164
    .end local v3    # "x":F
    :cond_81
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v4

    if-ne v4, v8, :cond_44

    .line 165
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mTimer:Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;

    invoke-virtual {v4, v6, v6}, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->monitorTouchPosition(FF)V

    .line 167
    iget v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->currentMoveItemPosition:I

    if-ltz v4, :cond_44

    .line 171
    invoke-direct {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->getVisibleRhythmViews()Ljava/util/List;

    move-result-object v2

    .line 173
    .local v2, "views":Ljava/util/List;, "Ljava/util/List<Landroid/view/View;>;"
    const/4 v0, 0x0

    .line 174
    .local v0, "selectedView":Landroid/view/View;
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v4

    iget v5, p0, Lcom/brixd/niceapp/control/RhythmLayout;->currentMoveItemPosition:I

    if-le v4, v5, :cond_a5

    .line 175
    iget v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->currentMoveItemPosition:I

    invoke-interface {v2, v4}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object v0

    .end local v0    # "selectedView":Landroid/view/View;
    check-cast v0, Landroid/view/View;

    .line 177
    .restart local v0    # "selectedView":Landroid/view/View;
    :cond_a5
    move-object v1, v0

    .line 178
    .local v1, "theSelectedView":Landroid/view/View;
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mHandler:Landroid/os/Handler;

    new-instance v5, Lcom/brixd/niceapp/control/RhythmLayout$1;

    invoke-direct {v5, p0, v1}, Lcom/brixd/niceapp/control/RhythmLayout$1;-><init>(Lcom/brixd/niceapp/control/RhythmLayout;Landroid/view/View;)V

    const-wide/16 v6, 0xc8

    invoke-virtual {v4, v5, v6, v7}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 192
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemListener:Lcom/brixd/niceapp/control/IRhythmItemListener;

    if-eqz v4, :cond_cc

    .line 193
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemListener:Lcom/brixd/niceapp/control/IRhythmItemListener;

    invoke-virtual {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->getFirstVisibleItemPosition()I

    move-result v5

    iget v6, p0, Lcom/brixd/niceapp/control/RhythmLayout;->currentMoveItemPosition:I

    add-int/2addr v5, v6

    invoke-interface {v4, v5}, Lcom/brixd/niceapp/control/IRhythmItemListener;->onSelected(I)V

    .line 197
    :goto_c2
    const/4 v4, -0x1

    iput v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->currentMoveItemPosition:I

    .line 199
    const-wide/16 v4, 0x14

    invoke-direct {p0, v4, v5}, Lcom/brixd/niceapp/control/RhythmLayout;->vibrate(J)V

    goto/16 :goto_44

    .line 195
    :cond_cc
    invoke-virtual {p0, v0, v8}, Lcom/brixd/niceapp/control/RhythmLayout;->bounceUpRhythmItem(Landroid/view/View;Z)Landroid/animation/Animator;

    goto :goto_c2
.end method

.method public getFirstVisibleItemPosition()I
    .registers 9

    .prologue
    const/4 v3, 0x0

    .line 69
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    if-nez v4, :cond_7

    move v1, v3

    .line 79
    :cond_6
    :goto_6
    return v1

    .line 72
    :cond_7
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v0

    .line 73
    .local v0, "count":I
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_e
    if-ge v1, v0, :cond_2c

    .line 74
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v2

    .line 75
    .local v2, "view":Landroid/view/View;
    invoke-virtual {p0}, Lcom/brixd/niceapp/control/RhythmLayout;->getScrollX()I

    move-result v4

    int-to-float v4, v4

    invoke-virtual {v2}, Landroid/view/View;->getX()F

    move-result v5

    iget v6, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemWidth:F

    const/high16 v7, 0x40000000

    div-float/2addr v6, v7

    add-float/2addr v5, v6

    cmpg-float v4, v4, v5

    if-ltz v4, :cond_6

    .line 73
    add-int/lit8 v1, v1, 0x1

    goto :goto_e

    .end local v2    # "view":Landroid/view/View;
    :cond_2c
    move v1, v3

    .line 79
    goto :goto_6
.end method

.method public getLayoutWrapper()Landroid/widget/LinearLayout;
    .registers 2

    .prologue
    .line 57
    iget-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    return-object v0
.end method

.method public getRhythmItemWidth()F
    .registers 2

    .prologue
    .line 97
    iget v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemWidth:F

    return v0
.end method

.method public invalidateData()V
    .registers 6

    .prologue
    const/4 v4, 0x0

    .line 137
    iget-object v2, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v2}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v0

    .line 138
    .local v0, "count":I
    iget-object v2, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mRhythmAdapter:Lcom/brixd/niceapp/control/RhythmAdapter;

    invoke-virtual {v2}, Lcom/brixd/niceapp/control/RhythmAdapter;->getCount()I

    move-result v2

    if-ge v0, v2, :cond_26

    .line 139
    move v1, v0

    .local v1, "i":I
    :goto_10
    iget-object v2, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mRhythmAdapter:Lcom/brixd/niceapp/control/RhythmAdapter;

    invoke-virtual {v2}, Lcom/brixd/niceapp/control/RhythmAdapter;->getCount()I

    move-result v2

    if-ge v1, v2, :cond_26

    .line 140
    iget-object v2, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    iget-object v3, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mRhythmAdapter:Lcom/brixd/niceapp/control/RhythmAdapter;

    invoke-virtual {v3, v1, v4, v4}, Lcom/brixd/niceapp/control/RhythmAdapter;->getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 139
    add-int/lit8 v1, v1, 0x1

    goto :goto_10

    .line 144
    .end local v1    # "i":I
    :cond_26
    return-void
.end method

.method protected onDetachedFromWindow()V
    .registers 2

    .prologue
    .line 401
    iget-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mTimer:Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;

    if-eqz v0, :cond_c

    .line 402
    iget-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mTimer:Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;

    invoke-virtual {v0}, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->reset()V

    .line 403
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mTimer:Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;

    .line 405
    :cond_c
    invoke-super {p0}, Landroid/widget/HorizontalScrollView;->onDetachedFromWindow()V

    .line 406
    return-void
.end method

.method public scrollToPosition(IIIZ)Landroid/animation/Animator;
    .registers 8
    .param p1, "position"    # I
    .param p2, "duration"    # I
    .param p3, "startDelay"    # I
    .param p4, "shouldStart"    # Z

    .prologue
    .line 344
    iget-object v2, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v2, p1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    .line 346
    .local v1, "view":Landroid/view/View;
    invoke-virtual {v1}, Landroid/view/View;->getX()F

    move-result v0

    .line 347
    .local v0, "scollTo":F
    float-to-int v2, v0

    invoke-direct {p0, v2, p2, p3, p4}, Lcom/brixd/niceapp/control/RhythmLayout;->smoothScrollX(IIIZ)Landroid/animation/Animator;

    move-result-object v2

    return-object v2
.end method

.method public scrollToPosition(IIZ)Landroid/animation/Animator;
    .registers 8
    .param p1, "position"    # I
    .param p2, "startDelay"    # I
    .param p3, "shouldStart"    # Z

    .prologue
    .line 337
    iget-object v2, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v2, p1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    .line 339
    .local v1, "view":Landroid/view/View;
    invoke-virtual {v1}, Landroid/view/View;->getX()F

    move-result v0

    .line 340
    .local v0, "scollTo":F
    float-to-int v2, v0

    const/16 v3, 0x12c

    invoke-direct {p0, v2, v3, p2, p3}, Lcom/brixd/niceapp/control/RhythmLayout;->smoothScrollX(IIIZ)Landroid/animation/Animator;

    move-result-object v2

    return-object v2
.end method

.method public setRhythmAdapter(Lcom/brixd/niceapp/control/RhythmAdapter;)V
    .registers 9
    .param p1, "rhythmAdapter"    # Lcom/brixd/niceapp/control/RhythmAdapter;

    .prologue
    const/4 v6, 0x0

    .line 107
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    if-nez v4, :cond_e

    .line 108
    const/4 v4, 0x0

    invoke-virtual {p0, v4}, Lcom/brixd/niceapp/control/RhythmLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/LinearLayout;

    iput-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    .line 111
    :cond_e
    iput-object p1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mRhythmAdapter:Lcom/brixd/niceapp/control/RhythmAdapter;

    .line 112
    const/4 v4, -0x1

    iput v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->lastDisplayItemPosition:I

    .line 114
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "total child count is "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    iget-object v5, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v5}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Lcom/zuiapps/suite/utils/log/LogUtil;->d(Ljava/lang/String;)V

    .line 115
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    .line 116
    .local v3, "viewList":Ljava/util/List;, "Ljava/util/List<Landroid/view/View;>;"
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v0

    .line 117
    .local v0, "count":I
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_3b
    if-ge v1, v0, :cond_49

    .line 118
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v2

    .line 119
    .local v2, "view":Landroid/view/View;
    invoke-interface {v3, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 117
    add-int/lit8 v1, v1, 0x1

    goto :goto_3b

    .line 122
    .end local v2    # "view":Landroid/view/View;
    :cond_49
    const/4 v1, 0x0

    :goto_4a
    if-ge v1, v0, :cond_5a

    .line 123
    invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/view/View;

    .line 124
    .restart local v2    # "view":Landroid/view/View;
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4, v2}, Landroid/widget/LinearLayout;->removeView(Landroid/view/View;)V

    .line 122
    add-int/lit8 v1, v1, 0x1

    goto :goto_4a

    .line 126
    .end local v2    # "view":Landroid/view/View;
    :cond_5a
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->invalidate()V

    .line 127
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->requestLayout()V

    .line 129
    const/4 v1, 0x0

    :goto_65
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mRhythmAdapter:Lcom/brixd/niceapp/control/RhythmAdapter;

    invoke-virtual {v4}, Lcom/brixd/niceapp/control/RhythmAdapter;->getCount()I

    move-result v4

    if-ge v1, v4, :cond_82

    .line 130
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mRhythmAdapter:Lcom/brixd/niceapp/control/RhythmAdapter;

    iget v5, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemWidth:F

    invoke-virtual {v4, v5}, Lcom/brixd/niceapp/control/RhythmAdapter;->setItemWidth(F)V

    .line 131
    iget-object v4, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    iget-object v5, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mRhythmAdapter:Lcom/brixd/niceapp/control/RhythmAdapter;

    invoke-virtual {v5, v1, v6, v6}, Lcom/brixd/niceapp/control/RhythmAdapter;->getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 129
    add-int/lit8 v1, v1, 0x1

    goto :goto_65

    .line 133
    :cond_82
    return-void
.end method

.method public setRhythmItemListener(Lcom/brixd/niceapp/control/IRhythmItemListener;)V
    .registers 2
    .param p1, "rhythmItemListener"    # Lcom/brixd/niceapp/control/IRhythmItemListener;

    .prologue
    .line 65
    iput-object p1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->rhythmItemListener:Lcom/brixd/niceapp/control/IRhythmItemListener;

    .line 66
    return-void
.end method

.method public setScrollRhythmStartDelayTime(I)V
    .registers 2
    .param p1, "scrollRhythmStartDelayTime"    # I

    .prologue
    .line 61
    iput p1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->scrollRhythmStartDelayTime:I

    .line 62
    return-void
.end method

.method public shootDownRhythmItem(IZ)Landroid/animation/Animator;
    .registers 5
    .param p1, "position"    # I
    .param p2, "shouldStart"    # Z

    .prologue
    .line 371
    if-ltz p1, :cond_19

    iget-object v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    if-eqz v1, :cond_19

    iget-object v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v1}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v1

    if-le v1, p1, :cond_19

    .line 372
    iget-object v1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mLinearLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v1, p1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    .line 373
    .local v0, "view":Landroid/view/View;
    invoke-virtual {p0, v0, p2}, Lcom/brixd/niceapp/control/RhythmLayout;->shootDownRhythmItem(Landroid/view/View;Z)Landroid/animation/Animator;

    move-result-object v1

    .line 375
    .end local v0    # "view":Landroid/view/View;
    :goto_18
    return-object v1

    :cond_19
    const/4 v1, 0x0

    goto :goto_18
.end method

.method public shootDownRhythmItem(Landroid/view/View;Z)Landroid/animation/Animator;
    .registers 6
    .param p1, "view"    # Landroid/view/View;
    .param p2, "shouldStart"    # Z

    .prologue
    .line 380
    if-eqz p1, :cond_c

    .line 381
    sget v0, Lcom/brixd/niceapp/control/RhythmLayout;->mItemInitTranslationHeight:I

    const/16 v1, 0x15e

    const/4 v2, 0x1

    invoke-static {p1, v0, v1, p2, v2}, Lcom/brixd/niceapp/animator/AnimatorUtils;->showUpAndDownBounce(Landroid/view/View;IIZZ)Landroid/animation/Animator;

    move-result-object v0

    .line 384
    :goto_b
    return-object v0

    .line 383
    :cond_c
    const-string v0, "faint, impossible!!!!!"

    invoke-static {v0}, Lcom/zuiapps/suite/utils/log/LogUtil;->w(Ljava/lang/String;)V

    .line 384
    const/4 v0, 0x0

    goto :goto_b
.end method

.method public showRhythmAtPosition(I)V
    .registers 14
    .param p1, "position"    # I

    .prologue
    const/4 v11, 0x3

    const/4 v10, 0x2

    const/4 v9, 0x1

    const/4 v8, 0x0

    .line 294
    iget v6, p0, Lcom/brixd/niceapp/control/RhythmLayout;->lastDisplayItemPosition:I

    if-ne v6, p1, :cond_9

    .line 334
    :goto_8
    return-void

    .line 302
    :cond_9
    const/4 v3, 0x0

    .line 303
    .local v3, "firstVisibleItemPosition":I
    iget v6, p0, Lcom/brixd/niceapp/control/RhythmLayout;->lastDisplayItemPosition:I

    if-ltz v6, :cond_19

    iget-object v6, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mRhythmAdapter:Lcom/brixd/niceapp/control/RhythmAdapter;

    invoke-virtual {v6}, Lcom/brixd/niceapp/control/RhythmAdapter;->getCount()I

    move-result v6

    const/4 v7, 0x7

    if-le v6, v7, :cond_19

    if-gt p1, v11, :cond_50

    .line 304
    :cond_19
    const/4 v3, 0x0

    .line 305
    iget v6, p0, Lcom/brixd/niceapp/control/RhythmLayout;->scrollRhythmStartDelayTime:I

    invoke-virtual {p0, v8, v6, v8}, Lcom/brixd/niceapp/control/RhythmLayout;->scrollToPosition(IIZ)Landroid/animation/Animator;

    move-result-object v4

    .line 314
    .local v4, "scrollAnimator":Landroid/animation/Animator;
    :goto_20
    invoke-virtual {p0, p1, v8}, Lcom/brixd/niceapp/control/RhythmLayout;->bounceUpRhythmItem(IZ)Landroid/animation/Animator;

    move-result-object v2

    .line 315
    .local v2, "bounceUpAnimator":Landroid/animation/Animator;
    iget v6, p0, Lcom/brixd/niceapp/control/RhythmLayout;->lastDisplayItemPosition:I

    invoke-virtual {p0, v6, v8}, Lcom/brixd/niceapp/control/RhythmLayout;->shootDownRhythmItem(IZ)Landroid/animation/Animator;

    move-result-object v5

    .line 317
    .local v5, "shootDownAnimator":Landroid/animation/Animator;
    new-instance v1, Landroid/animation/AnimatorSet;

    invoke-direct {v1}, Landroid/animation/AnimatorSet;-><init>()V

    .line 318
    .local v1, "animatorBounceSet":Landroid/animation/AnimatorSet;
    if-eqz v5, :cond_71

    if-eqz v2, :cond_71

    .line 319
    new-array v6, v10, [Landroid/animation/Animator;

    aput-object v2, v6, v8

    aput-object v5, v6, v9

    invoke-virtual {v1, v6}, Landroid/animation/AnimatorSet;->playTogether([Landroid/animation/Animator;)V

    .line 328
    :goto_3c
    new-instance v0, Landroid/animation/AnimatorSet;

    invoke-direct {v0}, Landroid/animation/AnimatorSet;-><init>()V

    .line 329
    .local v0, "animatorAllSet":Landroid/animation/AnimatorSet;
    new-array v6, v10, [Landroid/animation/Animator;

    aput-object v4, v6, v8

    aput-object v1, v6, v9

    invoke-virtual {v0, v6}, Landroid/animation/AnimatorSet;->playSequentially([Landroid/animation/Animator;)V

    .line 330
    invoke-virtual {v0}, Landroid/animation/AnimatorSet;->start()V

    .line 332
    iput p1, p0, Lcom/brixd/niceapp/control/RhythmLayout;->lastDisplayItemPosition:I

    goto :goto_8

    .line 306
    .end local v0    # "animatorAllSet":Landroid/animation/AnimatorSet;
    .end local v1    # "animatorBounceSet":Landroid/animation/AnimatorSet;
    .end local v2    # "bounceUpAnimator":Landroid/animation/Animator;
    .end local v4    # "scrollAnimator":Landroid/animation/Animator;
    .end local v5    # "shootDownAnimator":Landroid/animation/Animator;
    :cond_50
    iget-object v6, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mRhythmAdapter:Lcom/brixd/niceapp/control/RhythmAdapter;

    invoke-virtual {v6}, Lcom/brixd/niceapp/control/RhythmAdapter;->getCount()I

    move-result v6

    sub-int/2addr v6, p1

    if-gt v6, v11, :cond_68

    .line 307
    iget-object v6, p0, Lcom/brixd/niceapp/control/RhythmLayout;->mRhythmAdapter:Lcom/brixd/niceapp/control/RhythmAdapter;

    invoke-virtual {v6}, Lcom/brixd/niceapp/control/RhythmAdapter;->getCount()I

    move-result v6

    add-int/lit8 v3, v6, -0x7

    .line 308
    iget v6, p0, Lcom/brixd/niceapp/control/RhythmLayout;->scrollRhythmStartDelayTime:I

    invoke-virtual {p0, v3, v6, v8}, Lcom/brixd/niceapp/control/RhythmLayout;->scrollToPosition(IIZ)Landroid/animation/Animator;

    move-result-object v4

    .restart local v4    # "scrollAnimator":Landroid/animation/Animator;
    goto :goto_20

    .line 310
    .end local v4    # "scrollAnimator":Landroid/animation/Animator;
    :cond_68
    add-int/lit8 v3, p1, -0x3

    .line 311
    iget v6, p0, Lcom/brixd/niceapp/control/RhythmLayout;->scrollRhythmStartDelayTime:I

    invoke-virtual {p0, v3, v6, v8}, Lcom/brixd/niceapp/control/RhythmLayout;->scrollToPosition(IIZ)Landroid/animation/Animator;

    move-result-object v4

    .restart local v4    # "scrollAnimator":Landroid/animation/Animator;
    goto :goto_20

    .line 320
    .restart local v1    # "animatorBounceSet":Landroid/animation/AnimatorSet;
    .restart local v2    # "bounceUpAnimator":Landroid/animation/Animator;
    .restart local v5    # "shootDownAnimator":Landroid/animation/Animator;
    :cond_71
    if-eqz v2, :cond_77

    .line 321
    invoke-virtual {v1, v2}, Landroid/animation/AnimatorSet;->play(Landroid/animation/Animator;)Landroid/animation/AnimatorSet$Builder;

    goto :goto_3c

    .line 322
    :cond_77
    if-eqz v5, :cond_7d

    .line 323
    invoke-virtual {v1, v5}, Landroid/animation/AnimatorSet;->play(Landroid/animation/Animator;)Landroid/animation/AnimatorSet$Builder;

    goto :goto_3c

    .line 325
    :cond_7d
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    const-string v7, "both are animator null "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    iget v7, p0, Lcom/brixd/niceapp/control/RhythmLayout;->lastDisplayItemPosition:I

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Lcom/zuiapps/suite/utils/log/LogUtil;->w(Ljava/lang/String;)V

    goto :goto_3c
.end method

.method public updateRhythmItemHeight(Landroid/view/View;I)V
    .registers 5
    .param p1, "view"    # Landroid/view/View;
    .param p2, "translationY"    # I

    .prologue
    const/4 v1, 0x1

    .line 389
    if-eqz p1, :cond_8

    .line 390
    const/16 v0, 0xb4

    invoke-static {p1, p2, v0, v1, v1}, Lcom/brixd/niceapp/animator/AnimatorUtils;->showUpAndDownBounce(Landroid/view/View;IIZZ)Landroid/animation/Animator;

    .line 391
    :cond_8
    return-void
.end method
